package com.ishowcode.service.impl;

import com.ishowcode.entity.Filebean;
import com.ishowcode.mappers.FileInfoMapper;
import com.ishowcode.service.FileInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FileInfoServiceImpl implements FileInfoService {
    @Resource
    FileInfoMapper fileInfoMapper;
    @Override
    public Filebean getFileByName(String fileName) {

        return fileInfoMapper.getFileByName(fileName);
    }

    @Override
    public Filebean getFileById(String fileId) {
        return fileInfoMapper.getFileById(fileId);
    }

    @Override
    public List getFileByUserId(String userId) {
        List<Filebean> fileByUserId = fileInfoMapper.getFileByUserId(userId);
        return fileByUserId;
    }

    @Override
    public Integer addFile(Filebean filebean) {
        return fileInfoMapper.addFile(filebean);
    }

    @Override
    public Integer deleteByFileId(String fileId) { return fileInfoMapper.deleteByFileId(fileId); }

    @Override
    public List<Filebean> getFileByMohu(String userId, String input) {return fileInfoMapper.getFileByMohu(userId,input);}

    @Override
    public List<Filebean> getFloderByUserId(String userId) { return fileInfoMapper.getFloderByUserId(userId);}

    @Override
    public Integer updatefileById(Filebean  file) { return fileInfoMapper.updatefileById(file); }

    @Override
    public List<Filebean> getFileByPid(String userId,String pid) { return fileInfoMapper.getFileByPid(userId,pid);}

    @Override
    public List<Filebean> getFileByType(String userId, String type, String input) { return fileInfoMapper.getFileByType(userId, type, input);}


}
